﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection.Metadata.Ecma335;
using System.Text;
using System.Threading.Tasks;
using OOP.Strage.DesignPattern;

namespace OOP.Template.DesignPattern
{
    public class AlipayProcessor : PaymentProcessor
    {
        private readonly IPaymentStrategy paymentStrategy;

        public AlipayProcessor(IPaymentStrategy paymentStrategy)
        {
            this.paymentStrategy = paymentStrategy;
        }

        protected override void ProcessPayment(decimal amount)
        {
            paymentStrategy.ProcessPayment(amount);
        }

        protected override bool ValidatePayment() => paymentStrategy.ValidatePayment();
    }
}
